<% if @task_type_options.present? %>
$('#task_type_options').html("<%= escape_javascript(render :partial=>"options_fields", :locals => {:task_options=>@task.try(:options), task_type_options: @task_type_options, }) %>");
<% end %>

<% if @task_type_description.present? || @task_type_config_options.present? %>
  $("#task_description").html("<%= escape_javascript(render :partial=>"task_configuration", :locals => {:task_options=>@task.try(:options), task_type_options: @task_type_options, task_type_description: @task_type_description, task_type_configuration: @task_type_configuration }) %>")
<% else %>
  $("#task_description").html("")
<% end %>

ready();

if($(".on-demand-toggle")[0] && $(".on-demand-toggle")[0].checked == true)
{
  $('.on-demand-optons').removeClass("hidden");
  $('.on-demand-optons').show();
}
else
{
  $('.on-demand-optons').hide();
}

// $(function(){ $(document).foundation(); });



<% if @task_type.to_s.match(/\ASearchProvider::/) %>
  $('.search_type_field').show();
<% else%>
  $('.search_type_field').hide();
<% end %> 


